package com.jcl.core.common.page;

import java.util.List;

public class PageResult<T> {

    private int curPage = 1;

    private Long total;

    private int rowSize = 10;

    private List<T> data;

    public PageResult() {
    }

    public PageResult(Integer curPage, Integer rowSize, long total, List<T> data) {

        this.data = data;
        this.total = total;
        if(null != rowSize){
            this.rowSize = rowSize;
        }
        if(null != curPage){
            this.curPage = curPage;
        }
    }

    public PageResult(Integer curPage, List<T> data) {
        if(null != curPage){
            this.curPage = curPage;
        }
        this.data = data;
    }
    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public int getRowSize() {
        return rowSize;
    }

    public void setRowSize(int rowSize) {
        this.rowSize = rowSize;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
